import axios from '@/functions/request';

function getList(params) {
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/flow/define/getAll",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e) 
        });
    })
}

function createInstance(params) {
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/flow/instance/createInstance",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e) 
        });
    })
}

export {
    getList,
    createInstance
}
